package com.megamusic.findshow.common.constant;

public enum AttributeEnum {


//    团建年会=1 &&PARTY聚会=2 &&朋友招待=3 &&
//             发布会=4 &&路演商演=5 &&求婚现场=6 &&沙龙交流=7

    ANNUALMEETING(1, "团建年会"),
    PARTY(2, "聚会"),
    FRIENDRECEPTION(3, "朋友招待"),
    RELEASECONFERENCE(4,"发布会"),
    PERFORMANCE(5,"路演商演"),
    PROPOSING(6,"求婚现场"),
    SHARON(7,"沙龙交流");


    private Integer index;
    private String name;

    AttributeEnum(Integer index, String name) {
        this.index = index;
        this.name = name;
    }

    public static String getName(Integer index) {
        for (AttributeEnum pt : AttributeEnum.values()) {
            if (pt.getIndex().equals(index)) {
                return pt.name;
            }
        }
        return null;
    }

    public static AttributeEnum getEnum(Integer index) {
        for (AttributeEnum pt : AttributeEnum.values()) {
            if (pt.getIndex().equals(index)) {
                return pt;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

}
